home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / ddx-mips.zip / MIPS.CF < prev    next >
Text File  |  1992-08-11  |  27KB  |  799 lines

  1. /**/# platform:  $Header: Mips.cf,v 4.104 92/08/11 17:23:55 dd Exp $
  2. /* DELETEME+ */
  3. /* this section will be deleted in the installed version of Mips.cf */
  4.  
  5. /* delete next line for non-5.0 build */
  6. #define    RISCOS5
  7.  
  8. /* delete next line for non-cross build */
  9. #define    CROSSBUILD
  10.  
  11. #ifndef RISCOS5
  12. #define    RISCOS4
  13. #endif
  14.  
  15. #if defined(RISCOS5) && !defined(PSManInst)
  16. #define    PSManInst YES
  17. #endif
  18.  
  19. #if defined(CROSSBUILD) && !defined(CrossEnvEnable)
  20. #define CrossEnvEnable    YES
  21. #endif
  22.  
  23. #ifndef NOMIPSBUILD
  24. #define    MIPSBUILD
  25. #define    MipsSysvArchitecture    /* force SYSV for MIPS RW build */
  26. #endif /* !NOMIPSBUILD */
  27.  
  28. #undef CROSSBUILD
  29. #undef RISCOS5
  30.  
  31. /* DELETEME- */
  32.  
  33. #define    OSName            RISCOS
  34.  
  35. #ifndef OSMajorVersion
  36. #ifndef RISCOS4
  37. #define OSMajorVersion 5
  38. #define OSMinorVersion 0
  39. #else
  40. #define OSMajorVersion 4
  41. #define OSMinorVersion 5
  42. #endif
  43. #endif /* OSMajorVersion */
  44.  
  45. /**/# operating system:  OSName OSMajorVersion./**/OSMinorVersion
  46.  
  47. /*****************************************************************************
  48.  *              Platform-specific parameters                       *
  49.  *****************************************************************************/
  50.  
  51. /* figure out systype; default is SVR3 */
  52.  
  53. #if !defined(MipsBsdArchitecture) && \
  54.     !defined(MipsSvr4Architecture) && \
  55.     !defined(MipsSvr3Architecture) && \
  56.     !defined(MipsSysvArchitecture)
  57.  
  58. /* explicitly specified BSD overrides RW4.1 imake default SYSV */
  59. #ifdef BSD
  60. #undef SYSV
  61. #endif
  62.  
  63. /* explicitly specified SVR3 overrides RW4.0 imake default BSD43 */
  64. #ifdef SVR3
  65. #undef BSD43
  66. #endif
  67.  
  68. #if defined(_SYSTYPE_BSD43) || defined(SYSTYPE_BSD43) || \
  69.     defined(BSD) || defined(BSD43)
  70. #define    MipsBsdArchitecture
  71. #else /* BSD43 */
  72. #if defined(_SYSTYPE_SVR4) || defined(SYSTYPE_SVR4) || defined(SVR4)
  73. #define    MipsSvr4Architecture
  74. #else /* SVR4 */
  75. #if defined(_SYSTYPE_SYSV) || defined(SYSTYPE_SYSV) || defined(SYSV) || \
  76.     defined(_SYSTYPE_SVR3) || defined(SYSTYPE_SVR3) || defined(SVR3)
  77. #define    MipsSysvArchitecture
  78. #endif /* SVR3 */
  79. #endif /* SVR4 */
  80. #endif /* BSD43 */
  81.  
  82. #endif /* !Mips*Architecture */
  83.  
  84. /* make sure we don't have conflicting definitions */
  85. #ifdef MipsBsdArchitecture
  86. #define    MipsSystype bsd43
  87. #undef SYSV
  88. #endif /* MipsBsdArchitecture */
  89. #ifdef MipsSvr4Architecture
  90. #define    MipsSystype svr4
  91. #undef BSD43
  92. #undef SYSV
  93. #endif /* MipsSvr4Architecture */
  94. #if defined(MipsSvr3Architecture) || defined(MipsSysvArchitecture)
  95. #undef MipsSvr3Architecture
  96. #undef MipsSysvArchitecture
  97. #define    MipsSvr3Architecture
  98. #define    MipsSysvArchitecture
  99. #define    MipsSystype sysv
  100. #undef BSD43
  101. #endif /* MipsSysvArchitecture */
  102.  
  103.  
  104. #ifndef DSOEnable
  105. #if OSMajorVersion >= 5
  106. #define    DSOEnable        YES
  107. #else
  108. #define    DSOEnable        NO
  109. #endif
  110. #endif /* DSOEnable */
  111.  
  112. #ifndef SVR4Enable
  113. #if OSMajorVersion >= 5
  114. #define    SVR4Enable        YES
  115. #else
  116. #define    SVR4Enable        NO
  117. #endif
  118. #endif /* SVR4Enable */
  119.  
  120. #ifndef CrossEnvEnable
  121. #define    CrossEnvEnable        NO
  122. #endif
  123.  
  124. #ifdef UseInstalled
  125. #define _Use(a,b) a
  126. #else
  127. #define _Use(a,b) b
  128. #endif
  129.  
  130. /* generic compiler options */
  131.  
  132.      CCOPT = -signed
  133.    DEFINES = -D_NO_PROTO /* For Motif.  Hope it doesn't mess anything up */
  134.      OPTIM = -O -Olimit 2000
  135.  
  136. #if DSOEnable
  137.  
  138. MIPSLDOPTIONS = \
  139. -Wl,-no_library_replacement,-transitive_link _Use( ,\
  140. -L$(AWIDGETSRC) -L$(TOOLKITSRC) -L$(XMUSRC) \
  141. -L$(EXTENSIONSRC)/lib -L$(XLIBSRC) -L$(OLDXLIBSRC))
  142.  
  143. #endif
  144.  
  145. /* systype-specific compiler options */
  146.  
  147. /* SVR4LIBS: -lgen is for regex */
  148.          SVR4TYPE = -systype svr4
  149.          SVR4DEFS = -DMips -DSVR4 -DMALLOC_0_RETURNS_NULL
  150.          SVR4INCS =
  151.          SVR4LIBS = -lsocket -lnsl -lmld -lgen
  152.        SVR4CFLAGS = $(OPTIM) $(CCOPT) $(SVR4TYPE) $(INCLUDES) $(SVR4DEFS) $(SVR4INCS) $(DEFINES)
  153.        DSOLD_svr4 = -elf -rpath /usr/svr4/usr/lib -set_version svr4_4.10
  154.     DSOLD_svr4ABI = -elf
  155.  
  156.  
  157. /* SYSVINCS: this should be fixed! */
  158. /* SYSVLIBS: -lPW is for regcmp */
  159.          SYSVTYPE = -systype svr3
  160.          SYSVDEFS = -DMips -DSYSV -DSVR3 -DMALLOC_0_RETURNS_NULL
  161.          SYSVINCS = -I$(COMP_TARGET_ROOT)/usr/include/bsd
  162.          SYSVLIBS = -lbsd -lmld -lPW
  163.        SYSVCFLAGS = $(OPTIM) $(CCOPT) $(SYSVTYPE) $(INCLUDES) $(SYSVDEFS) $(SYSVINCS) $(DEFINES)
  164.        DSOLD_sysv = -rpath /usr/svr3/usr/lib -set_version sysv_4.10
  165.  
  166.           BSDTYPE = -systype bsd43
  167.           BSDDEFS = -DMips -DBSD43
  168.           BSDINCS =
  169.           BSDLIBS = -lmld
  170.         BSDCFLAGS = $(OPTIM) $(CCOPT) $(BSDTYPE) $(INCLUDES) $(BSDDEFS) $(BSDINCS) $(DEFINES)
  171.       DSOLD_bsd43 = -rpath /usr/bsd43/usr/lib -set_version bsd43_4.10
  172.  
  173. #ifdef MipsSysvArchitecture
  174. #define SystemV YES
  175. #undef SYSV
  176. #define    MipsSystypeUC SYSV
  177.           SYSTYPE = $(SYSVTYPE)
  178.           SYSDEFS = $(SYSVDEFS)
  179.           SYSINCS = $(SYSVINCS)
  180.           SYSLIBS = $(SYSVLIBS)
  181. #define LintLibFlag -o
  182. #define LintOpts -ax
  183. #endif /* MipsSysvArchitecture */
  184.  
  185. #ifdef MipsBsdArchitecture
  186. #define SystemV NO
  187. #undef BSD
  188. #define    MipsSystypeUC BSD
  189.           SYSTYPE = $(BSDTYPE)
  190.           SYSDEFS = $(BSDDEFS)
  191.           SYSINCS = $(BSDINCS)
  192.           SYSLIBS = $(BSDLIBS)
  193. #define LintLibFlag -C
  194. #define LintOpts -axz
  195. #endif /* MipsBsdArchitecture */
  196.  
  197. #ifdef MipsSvr4Architecture
  198. #define SystemV4 YES    /* XXX is this needed? */
  199. #undef SVR4
  200. #define    MipsSystypeUC SVR4
  201.           SYSTYPE = $(SVR4TYPE)
  202.           SYSDEFS = $(SVR4DEFS)
  203.           SYSINCS = $(SVR4INCS)
  204.           SYSLIBS = $(SVR4LIBS)
  205. #define LintLibFlag -o
  206. #define LintOpts -ax
  207. #endif /* MipsSvr4Architecture */
  208.  
  209. /* Override macros defined in Imake.tmpl */
  210. #define InstDatFlags -m 0444 
  211. #define ArCmd ar cr
  212. #define BootstrapCFlags $(SYSDEFS) $(SYSTYPE)
  213. #define CcCmd cc $(ECFLAGS)
  214. #define ExecableScripts YES
  215. #define CppCmd /usr/X11/bin/extra/cpp
  216. #define InstallCmd $(ETCDIR)/mipsinstall
  217. #define LdCmd ld $(LDFLAGS)
  218. #define LnCmd ln -s
  219. #define MakeCmd make MakeEnv
  220. #define RanlibCmd true
  221. #define ServerCcCmd cc
  222. #define StandardCppDefines $(SYSDEFS)
  223. #define StandardDefines $(SYSDEFS) $(SYSTYPE) $(SYSINCS)
  224. #define ExtraLibraries $(SYSLIBS)
  225.  
  226. #define SetTtyGroup            YES
  227. #define UnalignedReferencesAllowed    NO     /* if arbitrary deref is okay */
  228.  
  229. #ifdef MipsBsdArchitecture
  230. #define HasBsearch            NO
  231. #define HasVoidSignalReturn        NO
  232. #else
  233. #define HasBsearch            YES
  234. #define HasVoidSignalReturn        YES
  235. #endif
  236.  
  237. #if DSOEnable
  238. #define FilesToClean *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut *.u *.b *.so
  239. #endif
  240.  
  241. #if DSOEnable
  242. #define LibSuffix so
  243. #else
  244. #define LibSuffix a
  245. #endif
  246.  
  247.            ETCDIR = /etc
  248.           ULIBDIR = /usr/svr3/usr/lib
  249.   
  250. #define MakeEnv ETCDIR='$(ETCDIR)' ULIBDIR='$(ULIBDIR)' -e
  251.  
  252.       XINSTALLDIR = _Use(X11,RISCwindows4.11)
  253.      INSTALLFLAGS = -m 0555
  254.         RS1210DIR = $(DESTDIR)/usr/$(XINSTALLDIR)/RS1210
  255.     CONTRIBBINDIR = $(DESTDIR)/usr/$(XINSTALLDIR)/contrib/bin
  256. CONTRIBAPPSDEFDIR = $(DESTDIR)/usr/$(XINSTALLDIR)/contrib/lib/app-defaults
  257.     CONTRIBMANDIR = $(MANDIR)
  258.     CONTRIBSRCDIR = $(DESTDIR)/usr/$(XINSTALLDIR)/contrib/src
  259.       EXTRABINDIR = $(BINDIR)/extra
  260.      RS1210LIBDIR = $(LIBDIR)/ncd
  261.  
  262.           BINPATH = /usr/bin/X11
  263.           LIBPATH = /usr/lib/X11
  264.           ETCPATH = /usr/etc/X11
  265.           ADMPATH = /usr/adm
  266.           NCDPATH = /usr/X11/ncd
  267.      EXTRABINPATH = $(BINPATH)/extra
  268.        NCDLIBPATH = $(LIBPATH)/ncd
  269.         XINITPATH = $(LIBPATH)/xinit
  270.           XDMPATH = $(ETCPATH)/xdm
  271.           UWMPATH = $(LIBPATH)/uwm
  272.           AWMPATH = $(LIBPATH)/awm
  273.           MWMPATH = $(LIBPATH)/mwm
  274.           TWMPATH = $(LIBPATH)/twm
  275.      XAPPLOADPATH = $(LIBPATH)/app-defaults
  276.         RS1210SRC = $(TOP)/rs1210
  277.  
  278. /** some additional Motif stuff        **/
  279.  
  280. /* #define ToolKitSrc $(MLIBSRC)/Xt  MLIBSRC uses Motif libXt for build */
  281.  
  282.        MOTIFSRC = $(TOP)/motif
  283.         MLIBSRC = $(MOTIFSRC)/lib
  284.      MCLIENTSRC = $(MOTIFSRC)/clients
  285.        MDEMOSRC = $(MOTIFSRC)/demos
  286.      MWIDGETSRC = $(MLIBSRC)/Xm
  287.    INCLUDEXMSRC = $(MLIBSRC)/Xm
  288.    MRESOURCESRC = $(MLIBSRC)/Mrm
  289.          MWMDIR = $(LIBDIR)/Mwm
  290.      DEMOBINDIR = $(DESTDIR)/usr/$(XINSTALLDIR)/demos/bin
  291.      DEMOSRCDIR = $(DESTDIR)/usr/$(XINSTALLDIR)/demos/src
  292.        MINCLUDE = $(TOP)/include
  293.          UILSRC = $(MCLIENTSRC)/uil
  294.        DEPXMLIB = $(MipsSystypeUC/**/DEPXMLIB)
  295.           XMLIB = $(MipsSystypeUC/**/XMLIB)
  296. DEPMRESOURCELIB = $(MipsSystypeUC/**/DEPMRESOURCELIB)
  297.    MRESOURCELIB = $(MipsSystypeUC/**/MRESOURCELIB)
  298.       DEPUILLIB = $(MipsSystypeUC/**/DEPUILLIB)
  299.          UILLIB = $(MipsSystypeUC/**/UILLIB)
  300.  
  301. /* WCM/MRI widget creation library stuff (for mvd and xdm) */
  302.           WCSRC = $(TOP)/lib/Wcl
  303.        WCLIBSRC = $(WCSRC)/Wc
  304.        DEPWCLIB = $(WCLIBSRC)/libWc.LibSuffix
  305.           WCLIB = _Use(-lWc,$(DEPWCLIB))
  306.       XMPLIBSRC = $(WCSRC)/Xmp
  307.       DEPXMPLIB = $(XMPLIBSRC)/libXmp.LibSuffix
  308.          XMPLIB = _Use(-lXmp,$(DEPXMPLIB))
  309.        XPLIBSRC = $(WCSRC)/Xp
  310.        DEPXPLIB = $(XPLIBSRC)/libXp.LibSuffix
  311.           XPLIB = _Use(-lXp,$(DEPXPLIB))
  312.  
  313. /* SVR4 Library macros */
  314.  
  315. /* define NONABI to use extra RISC/os shared libraries not in ABI */
  316. #ifdef NONABI
  317. #define    Svr4LibSuffix LibSuffix
  318. #define    Svr4Use(a,b) _Use(a,b)
  319. #else
  320. #define    Svr4LibSuffix a
  321. #define    Svr4Use(a,b) b
  322. #endif
  323.  
  324. SVR4DEPEXTENSIONLIB = _Use($(USRLIBDIR),$(EXTENSIONSRC)/lib)/libsvr4Xext.Svr4LibSuffix
  325.    SVR4EXTENSIONLIB = Svr4Use(-lXext,$(SVR4DEPEXTENSIONLIB))
  326. #if DSOEnable
  327.        SVR4DEPXLIB1 = _Use($(USRLIBDIR),$(XLIBSRC))/libsvr4X11.so.1
  328. #else
  329.        SVR4DEPXLIB1 = _Use($(USRLIBDIR),$(XLIBSRC))/libsvr4X11.Svr4LibSuffix
  330. #endif
  331.         SVR4DEPXLIB = $(SVR4DEPEXTENSIONLIB) $(SVR4DEPXLIB1)
  332. #ifdef Mips_ld_understands_libX11_so_1
  333.            SVR4XLIB = $(SVR4EXTENSIONLIB) _Use(-lX11,$(SVR4DEPXLIB1))
  334. #else
  335.            SVR4XLIB = $(SVR4EXTENSIONLIB) $(SVR4DEPXLIB1)
  336. #endif
  337.     SVR4DEPXAUTHLIB = _Use($(USRLIBDIR),$(XAUTHSRC))/libsvr4Xau.Svr4LibSuffix
  338.        SVR4XAUTHLIB = Svr4Use(-lXau,$(SVR4DEPXAUTHLIB))
  339.       SVR4DEPXMULIB = _Use($(USRLIBDIR),$(XMUSRC))/libsvr4Xmu.Svr4LibSuffix
  340.          SVR4XMULIB = Svr4Use(-lXmu,$(SVR4DEPXMULIB))
  341.      SVR4DEPOLDXLIB = _Use($(USRLIBDIR),$(OLDXLIBSRC))/libsvr4oldX.Svr4LibSuffix
  342.         SVR4OLDXLIB = Svr4Use(-loldX,$(SVR4DEPOLDXLIB))
  343.     SVR4DEPXTOOLLIB = _Use($(USRLIBDIR),$(TOOLKITSRC))/libsvr4Xt.Svr4LibSuffix
  344.        SVR4XTOOLLIB = Svr4Use(-lXt,$(SVR4DEPXTOOLLIB))
  345.       SVR4DEPXAWLIB = _Use($(USRLIBDIR),$(AWIDGETSRC))/libsvr4Xaw.Svr4LibSuffix
  346.          SVR4XAWLIB = Svr4Use(-lXaw,$(SVR4DEPXAWLIB))
  347.     SVR4DEPXDMCPLIB = _Use($(USRLIBDIR),$(XDMCPLIBSRC))/libsvr4Xdmcp.Svr4LibSuffix
  348.        SVR4XDMCPLIB = Svr4Use(-lXdmcp,$(SVR4DEPXDMCPLIB))
  349.  
  350.    SVR4DEPXMTOOLLIB = _Use($(USRLIBDIR),$(MTOOLKITSRC))/libsvr4Xt.Svr4LibSuffix
  351.       SVR4XMTOOLLIB = Svr4Use(-lXt,$(SVR4DEPXMTOOLLIB))
  352.        SVR4DEPXMLIB = _Use($(USRLIBDIR),$(MWIDGETSRC))/libsvr4Xm.Svr4LibSuffix
  353.           SVR4XMLIB = Svr4Use(-lXm,$(SVR4DEPXMLIB))
  354. SVR4DEPMRESOURCELIB = _Use($(USRLIBDIR),$(MRESOURCESRC))/libsvr4Mrm.Svr4LibSuffix
  355.    SVR4MRESOURCELIB = Svr4Use(-lMrm,$(SVR4DEPMRESOURCELIB))
  356.       SVR4DEPUILLIB = _Use($(USRLIBDIR),$(UILSRC))/libsvr4Uil.Svr4LibSuffix
  357.          SVR4UILLIB = Svr4Use(-lUil,$(SVR4DEPUILLIB))
  358.  
  359.        SVR4DEPWCLIB = _Use($(USRLIBDIR),$(WCLIBSRC))/libsvr4Wc.Svr4LibSuffix
  360.           SVR4WCLIB = Svr4Use(-lWc,$(SVR4DEPWCLIB))
  361.  
  362.       SVR4DEPXMPLIB = _Use($(USRLIBDIR),$(XMPLIBSRC))/libsvr4Xmp.Svr4LibSuffix
  363.          SVR4XMPLIB = Svr4Use(-lXmp,$(SVR4DEPXMPLIB))
  364.  
  365.        SVR4DEPXPLIB = _Use($(USRLIBDIR),$(XPLIBSRC))/libsvr4Xp.Svr4LibSuffix
  366.           SVR4XPLIB = Svr4Use(-lXp,$(SVR4DEPXPLIB))
  367.  
  368. #undef Svr4LibSuffix
  369. #undef Svr4Use
  370.  
  371. /* SYSV Library macros */
  372. SYSVDEPEXTENSIONLIB = _Use($(USRLIBDIR),$(EXTENSIONSRC)/lib)/libsysvXext.LibSuffix
  373.    SYSVEXTENSIONLIB = _Use(-lXext,$(SYSVDEPEXTENSIONLIB))
  374.        SYSVDEPXLIB1 = _Use($(USRLIBDIR),$(XLIBSRC))/libsysvX11.LibSuffix
  375.         SYSVDEPXLIB = $(SYSVDEPEXTENSIONLIB) $(SYSVDEPXLIB1)
  376.            SYSVXLIB = $(SYSVEXTENSIONLIB) _Use(-lX11,$(SYSVDEPXLIB1))
  377.     SYSVDEPXAUTHLIB = _Use($(USRLIBDIR),$(XAUTHSRC))/libsysvXau.LibSuffix
  378.        SYSVXAUTHLIB = _Use(-lXau,$(SYSVDEPXAUTHLIB))
  379.       SYSVDEPXMULIB = _Use($(USRLIBDIR),$(XMUSRC))/libsysvXmu.LibSuffix
  380.          SYSVXMULIB = _Use(-lXmu,$(SYSVDEPXMULIB))
  381.      SYSVDEPOLDXLIB = _Use($(USRLIBDIR),$(OLDXLIBSRC))/libsysvoldX.LibSuffix
  382.         SYSVOLDXLIB = _Use(-loldX,$(SYSVDEPOLDXLIB))
  383.     SYSVDEPXTOOLLIB = _Use($(USRLIBDIR),$(TOOLKITSRC))/libsysvXt.LibSuffix
  384.        SYSVXTOOLLIB = _Use(-lXt,$(SYSVDEPXTOOLLIB))
  385.       SYSVDEPXAWLIB = _Use($(USRLIBDIR),$(AWIDGETSRC))/libsysvXaw.LibSuffix
  386.          SYSVXAWLIB = _Use(-lXaw,$(SYSVDEPXAWLIB))
  387.     SYSVDEPXDMCPLIB = _Use($(USRLIBDIR),$(XDMCPLIBSRC))/libsysvXdmcp.LibSuffix
  388.        SYSVXDMCPLIB = _Use(-lXdmcp,$(SYSVDEPXDMCPLIB))
  389.  
  390.    SYSVDEPXMTOOLLIB = _Use($(USRLIBDIR),$(MTOOLKITSRC))/libsysvXt.LibSuffix
  391.       SYSVXMTOOLLIB = _Use(-lXt,$(SYSVDEPXMTOOLLIB))
  392.        SYSVDEPXMLIB = _Use($(USRLIBDIR),$(MWIDGETSRC))/libsysvXm.LibSuffix
  393.           SYSVXMLIB = _Use(-lXm,$(SYSVDEPXMLIB))
  394. SYSVDEPMRESOURCELIB = _Use($(USRLIBDIR),$(MRESOURCESRC))/libsysvMrm.LibSuffix
  395.    SYSVMRESOURCELIB = _Use(-lMrm,$(SYSVDEPMRESOURCELIB))
  396.       SYSVDEPUILLIB = _Use($(USRLIBDIR),$(UILSRC))/libsysvUil.LibSuffix
  397.          SYSVUILLIB = _Use(-lUil,$(SYSVDEPUILLIB))
  398.  
  399.        SYSVDEPWCLIB = _Use($(USRLIBDIR),$(WCLIBSRC))/libsysvWc.LibSuffix
  400.           SYSVWCLIB = _Use(-lWc,$(SYSVDEPWCLIB))
  401.  
  402.       SYSVDEPXMPLIB = _Use($(USRLIBDIR),$(XMPLIBSRC))/libsysvXmp.LibSuffix
  403.          SYSVXMPLIB = _Use(-lXmp,$(SYSVDEPXMPLIB))
  404.  
  405.        SYSVDEPXPLIB = _Use($(USRLIBDIR),$(XPLIBSRC))/libsysvXp.LibSuffix
  406.           SYSVXPLIB = _Use(-lXp,$(SYSVDEPXPLIB))
  407.  
  408. /* BSD Library macros */
  409.  BSDDEPEXTENSIONLIB = _Use($(USRLIBDIR),$(EXTENSIONSRC)/lib)/libbsd43Xext.LibSuffix
  410.     BSDEXTENSIONLIB = _Use(-lXext,$(BSDDEPEXTENSIONLIB))
  411.         BSDDEPXLIB1 = _Use($(USRLIBDIR),$(XLIBSRC))/libbsd43X11.LibSuffix
  412.          BSDDEPXLIB = $(BSDDEPEXTENSIONLIB) $(BSDDEPXLIB1)
  413.             BSDXLIB = $(BSDEXTENSIONLIB) _Use(-lX11,$(BSDDEPXLIB1))
  414.      BSDDEPXAUTHLIB = _Use($(USRLIBDIR),$(XAUTHSRC))/libbsd43Xau.LibSuffix
  415.         BSDXAUTHLIB = _Use(-lXau,$(BSDDEPXAUTHLIB))
  416.        BSDDEPXMULIB = _Use($(USRLIBDIR),$(XMUSRC))/libbsd43Xmu.LibSuffix
  417.           BSDXMULIB = _Use(-lXmu,$(BSDDEPXMULIB))
  418.       BSDDEPOLDXLIB = _Use($(USRLIBDIR),$(OLDXLIBSRC))/libbsd43oldX.LibSuffix
  419.          BSDOLDXLIB = _Use(-loldX,$(BSDDEPOLDXLIB))
  420.      BSDDEPXTOOLLIB = _Use($(USRLIBDIR),$(TOOLKITSRC))/libbsd43Xt.LibSuffix
  421.         BSDXTOOLLIB = _Use(-lXt,$(BSDDEPXTOOLLIB))
  422.        BSDDEPXAWLIB = _Use($(USRLIBDIR),$(AWIDGETSRC))/libbsd43Xaw.LibSuffix
  423.           BSDXAWLIB = _Use(-lXaw,$(BSDDEPXAWLIB))
  424.      BSDDEPXDMCPLIB = _Use($(USRLIBDIR),$(XDMCPLIBSRC))/libbsd43Xdmcp.LibSuffix
  425.         BSDXDMCPLIB = _Use(-lXdmcp,$(BSDDEPXDMCPLIB))
  426.  
  427.     BSDDEPXMTOOLLIB = _Use($(USRLIBDIR),$(MTOOLKITSRC))/libbsd43Xt.LibSuffix
  428.        BSDXMTOOLLIB = _Use(-lXt,$(BSDDEPXMTOOLLIB))
  429.         BSDDEPXMLIB = _Use($(USRLIBDIR),$(MWIDGETSRC))/libbsd43Xm.LibSuffix
  430.            BSDXMLIB = _Use(-lXm,$(BSDDEPXMLIB))
  431.  BSDDEPMRESOURCELIB = _Use($(USRLIBDIR),$(MRESOURCESRC))/libbsd43Mrm.LibSuffix
  432.     BSDMRESOURCELIB = _Use(-lMrm,$(BSDDEPMRESOURCELIB))
  433.        BSDDEPUILLIB = _Use($(USRLIBDIR),$(UILSRC))/libbsd43Uil.LibSuffix
  434.           BSDUILLIB = _Use(-lUil,$(BSDDEPUILLIB))
  435.  
  436.         BSDDEPWCLIB = _Use($(USRLIBDIR),$(WCLIBSRC))/libbsd43Wc.LibSuffix
  437.            BSDWCLIB = _Use(-lWc,$(BSDDEPWCLIB))
  438.  
  439.        BSDDEPXMPLIB = _Use($(USRLIBDIR),$(XMPLIBSRC))/libbsd43Xmp.LibSuffix
  440.           BSDXMPLIB = _Use(-lXmp,$(BSDDEPXMPLIB))
  441.  
  442.         BSDDEPXPLIB = _Use($(USRLIBDIR),$(XPLIBSRC))/libbsd43Xp.LibSuffix
  443.            BSDXPLIB = _Use(-lXp,$(BSDDEPXPLIB))
  444.  
  445. #if CrossEnvEnable
  446.   BUILDTOOLSDIR = $(TOP)/buildtools
  447. CROSSENVOVERRIDE= CC="/usr/bin/cc" MIPSLDOPTIONS= LD="/usr/bin/ld" DESTROOT=/ COMP_TARGET_ROOT=/ COMP_HOST_ROOT=/ _RLD_ROOT=/ _RLD_PATH=/lib/rld ETCDIR=/etc ULIBDIR=/usr/lib OPTIM=
  448. #endif /* CrossEnvEnable */
  449.  
  450. /*****************************************************************************
  451.  *                                                                           *
  452.  *            POSTSCRIPT MAN PAGE DEFINES                 *
  453.  *                                                                           *
  454.  *****************************************************************************/
  455.  
  456. #ifdef UseInstalled
  457. #undef PSManInst
  458. #define PSManInst    NO
  459. #endif /* PSManInst */
  460.  
  461. #ifndef PSManInst
  462. #define PSManInst    NO
  463. #endif /* PSManInst */
  464.  
  465. #if PSManInst
  466. #define PSManDirectoryRoot /psman/cat
  467.    PSRELATIVEMANPATH = $(MANDIR)/../../**/PSManDirectoryRoot
  468. PSRELATIVELIBMANPATH = $(LIBMANDIR)/../../**/PSManDirectoryRoot
  469.            PTROFFDIR = /rwcrossenv/usr/local/bin
  470.               PTROFF = $(PTROFFDIR)/ptroff
  471. #endif /* PSManInst */
  472.  
  473. /*****************************************************************************
  474.  *                                                                           *
  475.  *            DEFINE PARAMETERS FOR BUILDING                       *
  476.  *                                                                           *
  477.  *****************************************************************************/
  478.  
  479. #define XmipsServer    Xmips        /* if BuildServer isn't set false */
  480. #define LibraryDefines    $(SYSDEFS) $(SYSTYPE) $(SYSINCS)
  481. #define ServerDefines    -DX11R4 $(BSDDEFS) $(BSDTYPE) $(BSDINCS)   /* Build server in BSD world */
  482. #define ConnectionFlags    -DTCPCONN -DUNIXCONN    /* -DDNETCONN */
  483. #define FontDefines    -DFONT_SNF -DFONT_BDF -DCOMPRESSED_FONTS
  484. #define ExtensionDefines -DMITMISC -DMITSHM -DMULTIBUFFER -DSHAPE /* -DXTESTEXT1 */ -DXTRAP
  485.  
  486. /* bandaid for improperly #ifdef-ed Imakefiles; will be cleaned up in R5 */
  487. #define    MITMISC
  488. #define    MITSHM
  489. #define    MULTIBUFFER
  490. #define    SHAPE
  491.  
  492.  
  493. /*****************************************************************************
  494.  *                                                                           *
  495.  *          OVERRIDE ANY CONFIGURATION PARAMETERS FROM Imake.tmpl          *
  496.  *                                                                           *
  497.  *****************************************************************************/
  498.  
  499.  
  500. #define BuildServer        YES
  501. #define BuildVisix        YES
  502. #define BuildMvd        YES
  503. #define BuildExamples        NO
  504. #ifndef MIPSBUILD
  505. #define    BuildMDemoBinarys    YES
  506. #endif
  507.  
  508. #define SpecialMalloc        NO
  509. #define ExpandManNames        YES    /* expand Xlib man page filenames */
  510. #define InstallXinitConfig    NO    /* install sample xinit config */
  511. #define InstallXdmConfig    YES    /* install sample xdm config */
  512.  
  513. #define PrimaryScreenResolution    110
  514. #define DefaultFontPath    /usr/X11/lib/X11/fonts/misc/,/usr/X11/lib/X11/fonts/100dpi/,/usr/X11/lib/X11/fonts/75dpi/,/usr/X11/lib/X11/fonts/oldX11/
  515. #define DefaultRGBDatabase    /usr/X11/lib/X11/rgb
  516.  
  517. /* Don't add anything after '1' and '3X' */
  518. #define ManSuffix    1
  519. #define LibManSuffix    3X
  520. #define UNCOMPRESSPATH    /usr/ucb/uncompress
  521. #define ConstructMFLAGS    NO        /* build MFLAGS from MAKEFLAGS */
  522. #define BDFTOSNFFILT -DBDFTOSNFFILT=\"$(BINPATH)/bdftosnf\"
  523. #define ZBDFTOSNFFILT -DZBDFTOSNFFILT=\"UNCOMPRESSPATH" | $(BINPATH)/bdftosnf $(FCFLAGS)\""
  524.  
  525. #define OptimizedCDebugFlags    $(OPTIM) $(CCOPT)
  526. #define DefaultCDebugFlags    OptimizedCDebugFlags
  527. #define LibraryCDebugFlags    OptimizedCDebugFlags
  528. #define ServerCDebugFlags    $(OPTIM) $(CCOPT) -G 4000
  529.  
  530. #define DestDir $(DESTROOT)
  531. #define UsrLibDir $(DESTDIR)/usr/$(XINSTALLDIR)/lib
  532. #define BinDir $(DESTDIR)/usr/$(XINSTALLDIR)/bin
  533. #define IncRoot $(DESTDIR)/usr/$(XINSTALLDIR)/include
  534. #define    XdmDir $(DESTDIR)/usr/var/X11/etc/xdm
  535.  
  536. #define DefaultUserPath /usr/net:/bin:/usr/bin:$(BINPATH):/usr/ucb
  537. #define DefaultSystemPath /usr/net:/bin:/usr/bin:/etc:$(BINPATH):/usr/ucb
  538.  
  539. #define ManDirectoryRoot /man/cat
  540. #define ManPath $(DESTDIR)/usr/$(XINSTALLDIR)/**/ManDirectoryRoot
  541. #define ManSourcePath $(MANPATH)/man
  542. #define ManDir $(MANSOURCEPATH)1
  543. #define LibmanDir $(MANSOURCEPATH)3
  544.  
  545. #define InstManFlags -m 0444
  546. #define InstAppFlags -m 0444 -f
  547. #define InstKmemFlags -g sys -m 2755
  548.  
  549. #if CrossEnvEnable
  550. #define FCCmd $(BUILDTOOLSDIR)/bdftosnf
  551. #define MkfontdirCmd $(BUILDTOOLSDIR)/mkfontdir
  552. #endif /* CrossEnvEnable */
  553.  
  554. #define ExtensionLib -L$(EXTENSIONSRC)/lib -lXext
  555. #define XLib -L$(XLIBSRC) -lX11
  556. #define XmuLib -L$(XMUSRC) -lXmu
  557. #define OldxLib -L$(OLDXLIBSRC) -loldX
  558. #define XtoolLib -L$(TOOLKITSRC) -lXt
  559. #define XawLib -L$(AWIDGETSRC) -lXaw
  560. /*****************************************************************************
  561.  *                                                                           *
  562.  *               DEFINE OS DEPENDENT RULES                 *
  563.  *                                                                           *
  564.  *****************************************************************************/
  565.  
  566. #define    MipsLibraryTarget(lib,cflags,objs)                @@\
  567. AllTarget(lib)                                @@\
  568.                                     @@\
  569. .s.a:                                    @@\
  570.     @                                @@\
  571.                                     @@\
  572. .c.a:                                    @@\
  573.     @                                @@\
  574.                                     @@\
  575. lib:: objs                                @@\
  576.     $(CC) -c cflags $(?:.o=.c)                    @@\
  577.     $(AR) $@ $?                            @@\
  578.     $(RM) $?
  579.  
  580. #define    MipsStrippedLibraryTarget(lib,cflags,objs)            @@\
  581. AllTarget(lib)                                @@\
  582.                                     @@\
  583. .s.a:                                    @@\
  584.     @                                @@\
  585.                                     @@\
  586. .c.a:                                    @@\
  587.     @                                @@\
  588.                                     @@\
  589. lib:: objs                                @@\
  590.     $(CC) -c cflags $(?:.o=.c)                    @@\
  591.     $(AR) $(@:.a=.ns.a) $?                        @@\
  592.     for i in $? ; do \                        @@\
  593.         $(LD) -x -r $$i ; \                    @@\
  594.         $(MV) a.out $$i ; \                    @@\
  595.     done                                @@\
  596.     $(AR) $@ $?                            @@\
  597.     $(RM) $?
  598.  
  599. #define    MipsLibraryDependTarget(lib,cflags,srcs)            @@\
  600. depend:: $(DEPEND)                            @@\
  601.                                     @@\
  602. depend::                                @@\
  603.     $(DEPEND) -A lib -s "# lib dependencies" -- cflags -- srcs    @@\
  604.                                     @@\
  605. $(DEPEND):                                @@\
  606.     @echo "making $@"; \                        @@\
  607.     cd $(DEPENDSRC) && $(MAKE) $(MFLAGS)                @@\
  608.  
  609. /*
  610.  * This target is the general interface for building a single program
  611.  */
  612. #define    ComplexProgramTargetWithFlags(program,flags)            @@\
  613.        PROGRAM = program                        @@\
  614.                                     @@\
  615. AllTarget(program)                            @@\
  616.                                     @@\
  617. program: $(OBJS)                            @@\
  618.     $(RM) $@                            @@\
  619.     $(CC) -o $@ $(OBJS) $(LDOPTIONS) $(LOCAL_LIBRARIES) $(LDLIBS) $(EXTRA_LOAD_FLAGS) @@\
  620.                                     @@\
  621. relink::                                @@\
  622.     $(RM) $(PROGRAM)                        @@\
  623.     $(MAKE) $(MFLAGS) MakeEnv $(PROGRAM)                @@\
  624.                                     @@\
  625. InstallProgramWithFlags(program,$(BINDIR),flags)            @@\
  626. InstallManPage(program,$(MANDIR))                    @@\
  627. DependTarget()                                @@\
  628. LintTarget()                                                            @@\
  629.                                     @@\
  630. clean::                                    @@\
  631.     $(RM) $(PROGRAM)
  632.  
  633.  
  634. /*
  635.  * Mips man page rules -- we install preformatted man pages only
  636.  *    InstallManPageLong             (file,destdir,dest)
  637.  *    InstallMultipleMan             (list,dest)
  638.  */
  639.  
  640. #if PSManInst
  641. #define _IfPSMan(a)a
  642. #else
  643. #define _IfPSMan(a)
  644. #endif
  645.  
  646. #define    _PSManFile(manfile)_IfPSMan(manfile.ps.Z)
  647.  
  648. /*
  649.  * InstallManPageLong - generate rules to install the indicated manual page,
  650.  * giving it an alternate name.  This is used for installing man pages whose
  651.  * base name without the .man suffix would normally be longer than 8 characters
  652.  * (the limit for using source code control systems on files systems with 
  653.  * short file names).
  654.  */
  655. #define    InstallManPageLong(file,destdir,dest)                @@\
  656. AllTarget(file.ManSuffix _PSManFile(file.ManSuffix))            @@\
  657.                                     @@\
  658. file.ManSuffix: file.man                        @@\
  659.     nroff -man $? > $@                        @@\
  660.                                     @@\
  661. install.man:: file.ManSuffix                        @@\
  662.     $(INSTALL) -c $(INSTMANFLAGS) -f file.ManSuffix destdir/dest.ManSuffix @@\
  663.                                     @@\
  664. _IfPSMan(\
  665. _PSManFile(file.ManSuffix): file.man                    @@\
  666.     $(PTROFF) -t -man $? | $(COMPRESS) > $@                @@\
  667.                                     @@\
  668. install.man:: _PSManFile(file.ManSuffix)                @@\
  669.     $(INSTALL) -c $(INSTMANFLAGS) -f _PSManFile(file.ManSuffix) \    @@\
  670.         `echo destdir | sed -e s/man/psman/`/dest.ManSuffix.Z    @@\
  671. )\
  672.                                     @@\
  673. clean::                                    @@\
  674.     $(RM) file.ManSuffix _PSManFile(file.ManSuffix)
  675.  
  676. /*
  677.  * InstallMultipleMan - generates rules to install a variety of manual
  678.  * pages during the install.man step of the build.
  679.  *
  680.  * XXX PostScript part won't work because we use this to install
  681.  * the *formatted* man pages.
  682.  */
  683. #define InstallMultipleMan(list,dest)                    @@\
  684. InstallMultipleDest(install.man,list,dest)                @@\
  685. _IfPSMan(\
  686.                                     @@\
  687. install.man:: list                            @@\
  688.     set -x; \                            @@\
  689.     psdest=`echo dest | sed -e s/man/psman/` ; \            @@\
  690.     for i in list; do \                        @@\
  691.         $(PTROFF) -t -man $$i | $(COMPRESS) > _PSManFile($$i); \ @@\
  692.         $(INSTALL) -c $(INSTMANFLAGS) -f _PSManFile($$i) $$psdest/$$i.Z; \ @@\
  693.     done                                @@\
  694. )
  695.  
  696.  
  697. #if CrossEnvEnable
  698. #define MipsMakeBuildTools(tool)                    @@\
  699. buildtools: tool                            @@\
  700.     $(INSTALL) -c $(INSTALLFLAGS) tool $(BUILDTOOLSDIR)        @@\
  701.     $(RM) tool                            @@\
  702.     $(RM_CMD) "#"*
  703. #endif /* CrossEnvEnable */
  704.  
  705. #if DSOEnable
  706.  
  707. #define    MipsLinkDSO(soname,arname,libdep,syslibdep,syst,abi) \
  708.     $(SHELL) $(SCRIPTSRC)/so_locations_util.sh -init $(TOP)        @@\
  709.     $(LD) -o $@ \                            @@\
  710.     -shared $(DSOLD_/**/syst/**/abi) \                @@\
  711.     -update_registry $(TOP)/lib/so_locations_/**/syst \        @@\
  712.     libdep \                            @@\
  713.     -so/**/name lib/**/soname \                    @@\
  714.     -L \                                @@\
  715.     -L$(DESTROOT)//**/syst/**//usr/lib \                @@\
  716.     -L$(DESTROOT)//**/syst/**//usr/lib/cmplrs/cc \            @@\
  717.     -L//**/syst/**//usr/lib \                    @@\
  718.     -L//**/syst/**//usr/lib/cmplrs/cc \                @@\
  719.     syslibdep \                            @@\
  720.     -all lib/**/syst/**/arname.ns.a
  721.  
  722. #define MipsDSOLibraryTarget(libname,libdep,syslibdep,syst) \
  723.     MipsDSOLibraryTarget2(libname/**/.so,libname,libdep,syslibdep,syst,)
  724.  
  725. #define MipsDSOLibraryTarget2(soname,arname,libdep,syslibdep,syst,abi)    @@\
  726. AllTarget(lib/**/syst/**/soname)                    @@\
  727.                                     @@\
  728. lib/**/syst/**/arname.ns.a: lib/**/syst/**/arname.a            @@\
  729.                                     @@\
  730. lib/**/syst/**/soname:: lib/**/syst/**/arname.ns.a            @@\
  731. MipsLinkDSO(soname,arname,libdep,syslibdep,syst,abi)
  732.  
  733. #define MipsInstallDSOLibrary(libname,dest) \
  734.     MipsInstallDSOLibrary2(libname.so,dest)
  735.  
  736. #define MipsInstallDSOLibrary2(soname,dest)                @@\
  737. install:: lib/**/soname                            @@\
  738.     $(INSTALL) -c $(INSTLIBFLAGS) lib/**/soname dest        @@\
  739.     $(SHELL) $(SCRIPTSRC)/so_locations_util.sh -install \        @@\
  740.         $(TOP) lib/**/soname dest
  741.  
  742. #define MipsAliasedDSOLibraryTarget(libname,alias)            @@\
  743. AllTarget(lib/**/alias.so)                        @@\
  744.                                     @@\
  745. lib/**/alias.so: lib/**/libname.so                    @@\
  746.     $(RM) $@                            @@\
  747.     $(LN) lib/**/libname.so $@
  748.  
  749. #define    MipsInstallDSOLibraryAlias(libname,alias,dest)            @@\
  750. install::                                @@\
  751.     -(cd dest && $(LN) lib/**/libname.so lib/**/alias.so)
  752. #endif /* DSOEnable */
  753.  
  754. /*
  755.  * MipsSpecialObjectRule - generate rules to compile a file with special flags.
  756.  */
  757. #ifndef MipsSpecialObjectRule
  758. #define MipsSpecialObjectRule(lib,objs,cflags,depends,options)        @@\
  759. lib:: lib(objs)                                @@\
  760.                                     @@\
  761. lib(objs):    depends                            @@\
  762.     $(CC) -c cflags options $(<:.o=.c)                @@\
  763.     $(AR) $(@:.a=.ns.a) $%                        @@\
  764.     $(LD) -x -r $%                            @@\
  765.     $(MV) a.out $%                             @@\
  766.     $(AR) lib $%                            @@\
  767.     $(RM) $%                            @@\
  768.     $(RANLIB) lib
  769. #endif /* MipsSpecialObjectRule */
  770.  
  771. /*
  772.  * MipsSourceInstall - used to install source for contrib and demo programs.
  773.  *               You must have Makefile.independent and source.list.
  774.  */
  775. #ifndef UseInstalled
  776. #define MipsSourceInstall(dir)                        @@\
  777. Makefile.independent: Imakefile                        @@\
  778.     @$(RM) $@                            @@\
  779.     $(IMAKE_CMD) -s $@ -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR) -DUseInstalled -DBuildMDemoBinarys @@\
  780.                                     @@\
  781. install:: Imakefile Makefile.independent source.list            @@\
  782.     $(INSTALL) -c $(INSTALLFLAGS) Imakefile dir            @@\
  783.     $(INSTALL) -c $(INSTALLFLAGS) -f Makefile.independent dir/Makefile @@\
  784.     cpio -pduvL dir < source.list
  785. #else /* UseInstalled */
  786. #define MipsSourceInstall(dir)
  787. #endif /* UseInstalled */
  788.  
  789. /*
  790.  * MipsInstallExec - generate rules to install an executable file.
  791.  *    (not a program that can be stripped and
  792.  *     not a shell script ending in .script)
  793.  */
  794. #ifndef MipsInstallExec
  795. #define    MipsInstallExec(file,dest)                    @@\
  796. install:: file                                @@\
  797.     $(INSTALL) -c $(INSTALLFLAGS) file dest
  798. #endif /* MipsInstallExec */
  799.